package com.ifdom.thread.basiccreatethread;

import java.util.concurrent.Callable;

/**
 * @Author ifredomvip@gmail.com
 * @Date 2022/9/21 10:59
 * @Version 1.0.0
 * @Description
 **/
public class ImplementCallable implements Callable<Integer> {

    @Override
    public Integer call() {
        int sum = 0;
        for (int i = 0; i < 10000; i++) {
            System.out.println(i + " - 线程名：" + Thread.currentThread().getName() + " - 线程Id：" + Thread.currentThread().getId());
            sum += 1;
        }
        return sum;
    }
}